<!doctype html>
<html class="reftest-wait">
<title>Auto sizes rendering</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/images.html#sizes-attributes">
<link rel="match" href="reference/sizes-auto-rendering-ref.html">
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<img
  id="testImg"
  loading="lazy"
  sizes="auto"
  width="33"
  height="13"
>
<script>
  function imageLoaded() {
    waitForAtLeastOneFrame().then(takeScreenshot);
  }

  testImg.addEventListener('load', imageLoaded);
  testImg.setAttribute('srcset', `
    /images/fail.gif 10w,
    /images/green.png 100w,
    /images/red.png 1000w
  `);
</script>
